<template>
  <div
    class="item_cards"
  >
    <i v-if="index" class="sort_index">{{index}}</i>
    {{title}}
    <div class="update_sort_box clearfix">
    </div>
    <i v-if="selected" class="el-icon-success"></i>
  </div>
</template>
<script>
export default {
  props: {
    index: {
      type: Number,
      default: null
    },
    title: {
      type: String,
      default: ''
    },
    selected: {
      type: Boolean,
      default: false
    }
  }
}
</script>

<style lang="less" scoped>
.item_cards
{
  position: relative;
  padding: 10px 20px 10px 70px;
  height: 40px;
  line-height: 40px;
  margin-bottom: 10px;
  .el-icon-success
  {
    color: #67c23a;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    position: absolute;
  }
  .update_sort_box
  {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    .update_sort_box_arrow
    {
      display: block;
      width: 30px;
      height: 30px;
      text-align: center;
      line-height: 30px;
      border: 1px solid #ddd;
      border-radius: 50%;
      color: #999;
      float: left;
      margin-right: 10px;
      &:hover
      {
        background-color:#3AC7F5;
        color: #fff;
        cursor: pointer;
      }
      &.disabled
      {
        background-color: #f6f6f6;
        &:hover
        {
          background-color:#f6f6f6;
          color: #999;
          cursor: pointer;
        }
      }
    }
  }
  .sort_index
  {
    position: absolute;
    left: 10px;
    top: 50%;
    margin-top: -20px;
    display: block;
    width: 40px;
    background-color: #3AC7F5;
    border-radius: 50%;
    height: 40px;
    line-height: 40px;
    text-align: center;
    font-style: normal;
    color: #fff;
  }
  &:hover
  {
    background-color: #f6f6f6;
    cursor: pointer;
  }
  .item_desc
  {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
  }
}
</style>
